<%@page import="com.mmy.domain.sys.TSysUser"%>
<!-- 引入公司 -->
<%@page import="com.mmy.domain.sys.TSysOrg"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
 <%
 	TSysUser tSysUser = (TSysUser)session.getAttribute("tSysUser");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<jsp:include page="/WEB-INF/jsp/includeb.jsp"></jsp:include>
<script type="text/javascript" src="js/jsp/back/member/memberIndex.js"></script>

<title>用户信息</title>
	</head>
	<body>
		<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/BackHeader.jsp"></jsp:include>
		
			<div id="menu-back">
			<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main Start -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<main class="at-padding-large-bottom">
			<article>
				<header class="bg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
					<div class="page-header container">
						<div class="row">
							<div class="span-5 col">
								<h1>会员资料管理</h1>
							</div>	
							
						 </div >
					</div>
				</header>
				<section class="container">
					
					
					<!-- 新建会员信息 -->
					<div class="information" >
					<form  action="backsavecreatemember" class="info-form" name="memberForm" method="post" onSubmit="return memberSubmit(this);">
						<h4 class="info-h4">
							<i class="fa fa-caret-right" aria-hidden="true" ></i>新建会员信息
						</h4>
					<div class="input-container">
					<table class="info-table" >
				
				<tr>
					<th style="width: 15%;"><label for="memberName">会员姓名</label><span class="mustWrite">*</span></th>
					<td colspan="2">
						<input type="text" id="memberName" name="UserName" required="required"/>
					</td>
					<th><label for="memberSex">性别</label><span class="mustWrite">*</span></th>
					<td colspan="2">
							<select class="input-select-vlign"  id="memberSex" name="Sex" required="required">
							<option value="">--请选择--</option>
								<option value="0">男</option>
								<option value="1">女</option>
								
					</select>
					</td>
					
					
				</tr>
				<tr >
<th><label for="memberIdentity">身份证号</label><span class="mustWrite">*</span></th>
					<td colspan="2" >
						<input type="text" id="memberIdentity"  name="Identity" required="required" onblur="ckIdentity(this.value)"/>
						<input type="radio" name="isPass" >是否通过验证</input>
					</td>
					<th><label for="memberMobile">手机号码</label><span class="mustWrite">*</span></th>
					<td colspan="2">
						<input type="number" id="memberMobile"  name="UserMobile" required="required" onblur="ckMobile(this.value)"/>
					</td>
					
				</tr>
				<tr>
				<th><label for="memberTypeName">会员类型</label><span class="mustWrite">*</span> </th>
					<td >
						<input type="hidden" id="memberType" name="UserType" readonly="readonly" value="0"/>
						<input type="text" id="memberTypeName" name="UserTypeName" readonly="readonly" value="游客"/>
					</td>
					<th><label for="memberOrg">所属公司名称</label><span class="mustWrite">*</span> </th>
					<td > 
					<!--判断登录人是否为超级管理员 显示所有公司  -->
					<c:choose>
					<c:when test="${tSysUser.getUserID()==0 }">
					<select class="input-select-vlign"  id="memberOrg"  name="OrgID" required="required" onChange="showUpUserID(this.value)">
					
								<option value="">--请选择--</option>
								<c:forEach var="lstSysOrg" items="${lstSysOrg}">
								<option value="${lstSysOrg.getOrgID()}">${lstSysOrg.getOrgName()}</option>
							</c:forEach>
						</select>
					</c:when>
					<c:otherwise>
					<!-- 非超级管理员登陆 只显示自己公司 -->
						<input type="text" id="memberOrg"  name="OrgID" value="${dbSysOrg.getOrgName() }" readonly="readonly"/>
					</c:otherwise>
					</c:choose>
					
					</td>
					
					<th><label for="memberUp">推荐人编码</label><span class="mustWrite">*</span></th>
					<td>
					<select class="input-select-vlign"  id="memberUp"  name="UpUserID" required="required" >
					
								<option value="">--请选择--</option>
								<c:forEach var="lstSysUser" items="${lstSysUser}">
								<option value="${lstSysUser.getUserID()}"  <c:if test="${lstSysUser.getUserID()==tSysUser.getUserID()}"> selected="selected"</c:if>>${lstSysUser.getUserID()}${lstSysUser.getUserName()}</option>
							</c:forEach>
						</select>
						</td> 
				</tr>
				
				<tr>
					<th><label for="memberMail">邮箱</label><span class="mustWrite">*</span> </th>
					<td >
						<input type="text"  id="memberMail" name="Mail" required="required" onblur="ckMail(this.value)"/>
					</td>
					<th><label for="memberTel">固定电话</label></th>
					<td >
						<input type="text" id="memberTel"  name="Tel"/>	 
					</td>
					<th><label for="memberFax">传真</label></th>
					<td >
						<input type="text" id="memberFax"  name="Fax"/>	 
					</td>
					
					
				</tr>
				
				<tr>
					
					<th><label for="memberJob">职位</label><span class="mustWrite">*</span> </th>
					<td >
						<input type="text" id="memberJob"  name="Job" required="required"/>	 
					</td>
					  <th><label for="up_img_WU_FILE_0">上传证件照片及个人照片</label> <span class="mustWrite">*</span> </th>
					
						  <td colspan="3">
					<!-- 	<input  id="staffCade" type="file" name="CadePath" required="required"/> -->
					
						<ul id="warp">
						  <li>
						证件照：
  							  <input type="file" id="up_img_WU_FILE_0" name="fCadeImg" required="required" />
   							 <img id="imgShow_WU_FILE_0" width="100" height="100" />
  							
  							</li>
 
 						 <li>							
					<!-- 	<input  id="staffPhoto" type="file" name="PhotoPath"/>  -->
					
    					个人照：	<input type="file" id="up_img_WU_FILE_1"  name="fPhotoImg"/>
  							  <img id="imgShow_WU_FILE_1" width="100" height="100" />
  							
 						 </li>
						</ul>	
					</td>
				</tr>
				<tr>
					
					<th><label for="memberVip">是否为VIP</label>
					</th>
					<td colspan="2">
					<input   type="radio"  name="VIP" value="0" id="memberVip0" checked/><label  for="memberVip0">否</label>
						<input  type="radio"  name="VIP" value="1" id="memberVip1" /><label for="memberVip1">是</label>
					
						</td>
					<th><label for="memberBlack">是否为黑名单</label></th>
					<td colspan="2">
					<input   type="radio"  name="Black" value="0" id="memberBlack0" checked/><label  for="memberBlack0">否</label>
						<input  type="radio"  name="Black" value="1" id="memberBlack1" /><label for="memberBlack1">是</label>
						</td>
					
				</tr>
				<tr>
					<th><label for="memberAccountState">账号状态</label></th>
					<td colspan="2">
					<input   type="radio"  name="AccountState" value="0" id="memberAccountState0" checked/><label  for="memberAccountState0">正常</label>
						<input  type="radio"  name="AccountState" value="1" id="memberAccountState1" /><label for="memberAccountState1">禁用</label>
					</td>
					<th><label for="memberState">会员状态</label></th>
					<td colspan="2">
					<input   type="radio"  name="MemberState" value="0" id="memberMemberState0" checked/><label  for="memberMemberState0">普通账号</label>
						<input  type="radio"  name="MemberState" value="1" id="memberMemberState1" /><label for="memberMemberState1">会员账号</label>
					</td>
				</tr>
			
				<tr>
					<th><label for="memberMemo">备注</label></th>
					<td colspan="5">
						<textarea  id="memberMemo"  name="Memo"></textarea>
					</td>
					
				</tr>
				
			</table>
			
			<center>
				<input type="submit" class="btn" value="保存" />
				<input type="button" class="btn" value="返回" onclick="rehidder()"/>
			</center> 
			</div>
			</form>
			</div>
			</section>
			</article>
			</main>
</div>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
	</div>
	
		<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>

</body>

</html>